import { defineConfig } from "vitepress";

// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: "GZY EAE",
  description: "Introduce how to use the EAE system website",
  head: [
    ["link", { rel: "icon", href: "/favicon.ico" }],
    ["meta", { name: "referrer", content: "no-referrer" }], // 禁用referrer，否则语雀图片防盗链导致无法显示
  ],
  lang: "zh-CN",
  srcDir: "src",
  lastUpdated: true, // 使用Git获取每个页面最后更新时间戳
  themeConfig: {
    logo: {
      light: "/logo-dark.png",
      dark: "/logo-light.png",
      alt: "logo",
    },
    search: {
      provider: "local",
    },
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      { text: "指南", link: "/guide/what-is-eae", activeMatch: "/guide/" },
      {
        text: "功能",
        link: "/page/sale/ocean-customer",
        activeMatch: "/page/",
      },
    ],

    sidebar: {
      "/guide/": [
        {
          text: "简介",
          items: [
            { text: "什么是 EAE？", link: "/guide/what-is-eae" },
            { text: "快速上手", link: "/guide/started" },
          ],
          collapsed: true,
        },
      ],
      "/page/": [
        {
          text: "销售",
          items: [
            { text: "公海客户", link: "/page/sale/ocean-customer" },
            { text: "客户管理", link: "/page/sale/customer" },
            { text: "线索管理", link: "/page/sale/clue" },
            { text: "项目看板", link: "/page/sale/dashboard" },
            { text: "文件库", link: "/page/sale/file-library" },
          ],
          collapsed: true,
        },
        {
          text: "售前",
          items: [{ text: "商机管理", link: "/page/presale/selling" }],
          collapsed: true,
        },
        {
          text: "实施",
          items: [{ text: "项目管理", link: "/page/im/project" }],
          collapsed: true,
        },
        {
          text: "运维",
          items: [{ text: "项目管理", link: "/page/OM/project" }],
          collapsed: true,
        },
        {
          text: "日常任务",
          items: [{ text: "日常任务", link: "/page/daily-task/daily-task" }],
          collapsed: true,
        },
        {
          text: "审批",
          items: [
            { text: "待办任务", link: "/page/approve/pending" },
            { text: "我的发起", link: "/page/approve/started" },
            { text: "我的已办", link: "/page/approve/completed" },
          ],
          collapsed: true,
        },
        {
          text: "系统设置",
          items: [
            { text: "企业信息管理", link: "/page/setting/enterprise" },
            {
              text: "员工与部门管理",
              link: "/page/setting/employee-department",
            },
            { text: "菜单管理", link: "/page/setting/menu" },
            { text: "角色管理", link: "/page/setting/roles" },
            { text: "工作流管理", link: "/page/setting/workflow" },
          ],
          collapsed: true,
        },
        {
          text: "系统任务",
          items: [
            { text: "我的任务", link: "/page/task/mine" },
            { text: "部门任务", link: "/page/task/department" },
          ],
          collapsed: true,
        },
        {
          text: "通用页面和功能",
          items: [
            { text: "流程模板管理", link: "/page/common/template" },
            { text: "任务管理", link: "/page/common/task" },
          ],
          collapsed: true,
        },
      ],
    },

    socialLinks: [
      {
        icon: {
          svg: '<svg t="1731655137383" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8787" width="200" height="200"><path d="M853.333333 170.666667H170.666667c-46.933333 0-85.333333 38.4-85.333334 85.333333v512c0 46.933333 38.4 85.333333 85.333334 85.333333h682.666666c46.933333 0 85.333333-38.4 85.333334-85.333333V256c0-46.933333-38.4-85.333333-85.333334-85.333333z m-213.333333 597.333333H170.666667v-170.666667h469.333333v170.666667z m0-213.333333H170.666667V384h469.333333v170.666667z m213.333333 213.333333h-170.666666V384h170.666666v384z" p-id="8788" fill="#515151"></path></svg>',
        },
        link: "https://eae.gzyxx.com/",
      },
    ],

    outline: {
      level: "deep",
      label: "页面导航",
    },

    lastUpdated: {
      text: "最后更新于",
    },

    footer: {
      message:
        '<a href="http://www.gzy808.com/" target="_blank">河北光之翼信息技术股份有限公司</a>',
      copyright: "Copyright © 2024-present 研发部",
    },

    docFooter: {
      prev: "上一页",
      next: "下一页",
    },

    lightModeSwitchTitle: "切换到浅色模式",
    darkModeSwitchTitle: "切换到深色模式",

    externalLinkIcon: true,

    editLink: {
      pattern: "https://gitee.com/zdmyzhz/eae-docs/edit/main/src/:path",
      text: "在Gitee上编辑此页",
    },
  },
});
